//
//  APPInfoHelper.m
//  OilUnion
//
//  Created by itte on 2016/12/21.
//  Copyright © 2016年 funmain. All rights reserved.
//

#import "APPInfoHelper.h"

@implementation APPInfoHelper

+(NSString *)getAppName
{
    NSDictionary *dictInfo = [[NSBundle mainBundle] infoDictionary];
    // app名称
    return [dictInfo objectForKey:@"CFBundleDisplayName"];
}

+(NSString *)getAppVersion
{
    NSDictionary *dictInfo = [[NSBundle mainBundle] infoDictionary];
    // app版本
    return [dictInfo objectForKey:@"CFBundleShortVersionString"];
}


+(NSString *)getAppBuild
{
    NSDictionary *dictInfo = [[NSBundle mainBundle] infoDictionary];
    // app build版本
    return [dictInfo objectForKey:@"CFBundleVersion"];
}


// app 简单唯一码
+(NSString *)getAppUID
{
    NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
    BOOL bHadInitConfig = [userDefaults boolForKey:@"bHadInitConfig"];
    if (bHadInitConfig) {
        return [userDefaults stringForKey:@"initTime"];
    }
    return @"";
}


@end
